//
//  NewOrdorListDetailViewController.m
//  HCNewGoldFinger
//
//  Created by 刘琛 on 2018/3/27.
//  Copyright © 2018年 zjhcsoftios. All rights reserved.
//

#import "NewOrdorListDetailViewController.h"
#import "NewMissonListDetailCell.h"
#import "UIColor+EX.h"
#import "iSeeNetworkRequest.h"
#import "NetworkAddress.h"
#import <MJExtension/MJExtension.h>
#import "SVProgressHUD.h"
#import "NSBundle+AssociatedBundle.h"

@interface NewOrdorListDetailViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UITableView *tableView;



@end

@implementation NewOrdorListDetailViewController

static NSString *newOrdorListDetailCellIdentify = @"newOrdorListDetailCellIdentify";

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [_tableView registerNib:[UINib nibWithNibName:@"NewMissonListDetailCell" bundle:[NSBundle bundleWithBundleName:@"NewMarketLib" podName:@"NewMarketLib"]] forCellReuseIdentifier:newOrdorListDetailCellIdentify];
    _tableView.rowHeight = UITableViewAutomaticDimension;
    _tableView.tableFooterView = [[UIView alloc] init];
    _tableView.backgroundColor = [UIColor colorWithHexString:@"EAECEF"];
//    _tableView.separatorInset = UIEdgeInsetsMake(0, 14, 0, 0);
//    _tableView.separatorColor = [UIColor colorWithHexString:@"EAECEF"];
    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    self.title = @"订单详情";
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    [self.tableView reloadData];
}

#pragma mark tableView

- (NSInteger )tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return _dataList.count;
}

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 44;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NewMissonListDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:newOrdorListDetailCellIdentify forIndexPath:indexPath];
    cell.titleLabel.text = [NSString stringWithFormat:@"%@:", _dataList[indexPath.row][@"k"]];
    cell.detailLabel.text = _dataList[indexPath.row][@"v"];
    cell.inputImage.hidden = YES;
    if (_dataList.count - 1 == indexPath.row) {
        cell.buttomLine.hidden = YES;
    }else {
        cell.buttomLine.hidden = NO;
    }
    [cell hiddenManuscripts];
    return cell;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
